<!--
Zeke Elder - zbe@andrew.cmu.edu
Amal Chemmany - achemman@andrew.cmu.edu
Nishant Kumar - nkumar1@andrew.cmu.edu
15-637
4/2/2012
-->
<html>
<head>
<title>Welcome to FitHub!</title>
<link rel="stylesheet" type="text/css" href="css/style.css" />
<script src="js/fithub.js">
	
</script>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<c:if test="${user == null}">
<c:redirect url="welcome.jsp"/>
</c:if>
</head>
<body>
<jsp:include page="./header.jsp" flush="false" />
<div id="maindiv" class="body_container">
		<div class="centered_div">
		<h2> Update Profile</h2>
		<form name="updateProfile" action="updateProfile.do" method="post" enctype="multipart/form-data">
			<table>
			<tbody>
			<c:forEach var="error" items="${errors}">
				<tr><h3 style="color:red"> ${error} </h3></tr>
			</c:forEach>
			<tr >
		  	</tr>
				<tr>
								<td colspan="2">First Name :</td>
								<td><input type="text" name="firstName"
									value="${registerForm.firstName}" /></td>
							</tr>
							<tr>
								<td colspan="2">Last Name :</td>
								<td><input type="text" name="lastName"
									value="${registerForm.lastName}" /></td>
							</tr>
		  	<tr >
		   	<td colspan="2">New Password :</td> <td> <input type="password" name="password" /> </td>
		  	</tr>
		  	<tr >
		   	<td colspan="2">New Password Confirmation :</td> <td> <input type="password" name="passwordConf" /> </td>
		  	</tr>
		  	<tr >
		  	<tr >
		   	<td colspan="2">Email Address :</td> <td> <input type="text" name="email" value="${registerForm.email}"/> </td>
		  	</tr>
		   	<td colspan="2">Age :</td> <td> <input type="text" name="age" value="${registerForm.age}"/> </td>
		  	</tr>
		  	<tr >
		   	<td colspan="2">Weight (lbs) :</td> <td> <input type="text" name="weight" value="${registerForm.weight}"/> </td>
		  	</tr>
		  	<tr >
		   	<td colspan="2">Timezone :</td> <td> <input type="text" name="timeZone" value="${registerForm.timeZone}"/> </td>
		  	</tr>
			<tr >
		   	<td colspan="2">Image:</td> <td> <input type="file" name="image" /> </td>
		  	</tr>
			<tr >
		   	<td colspan="3" class="form_submit" > <input type="submit" value="update" /> </td>
		  	</tr>
			</table>
		</form>
		</div>
</div>
</body>
</html>